<template>
  <div class="col-xs-offset-2 col-xs-8">
    <div class="page-header">
      <h2>Vue Router Demo</h2>
      <button @click="back">前进</button>
      <button @click="forward">后退</button>
      <button @click="test">测试go</button>
    </div>
  </div>
</template>

<script>
export default {
  name:"banner",
  methods: {
    back(){
       this.$router.back()//找路由前进
    },
    forward(){
       this.$router.forward()//找路由后退
    },
    test(){
      console.log(123);
       this.$router.go(-2)//正数是前进 负数是后退 -back +forward
    }
  }
};
</script>

<style>
</style>